# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Christian Hesse <mail@eworm.de>
# Contributor: Julian Knauer <jpk@goatpr0n.de>

pkgname=sieve-connect
pkgver=0.90
pkgrel=2
pkgdesc="Client for the MANAGESIEVE protocol"
arch=('any')
url="http://people.spodhuis.org/phil.pennock/software/"
license=('BSD')
depends=('perl-authen-sasl' 'perl-io-socket-inet6' 'perl-io-socket-ssl' 'perl-net-dns' 'perl-term-readkey')
optdepends=(
  'perl-term-readline: improves interactive mode'
  'perl-term-readline-gnu: adds tab-completion'
)
validpgpkeys=('ACBB4324393ADE3515DA2DDA4D1E900E14C1CC04') # Phil Pennock <phil.pennock@spodhuis.org>
source=("https://github.com/philpennock/sieve-connect/releases/download/v$pkgver/$pkgname-$pkgver.tar.bz2"{,.asc})
b2sums=('d6bc466caffa3344537b1777b00a66f34697139d474763862c5296367f1e69174078a5e864225c1e967fbc5677c97d3ef71a4b75b677952d7b4993a5b8a08108'
        'SKIP')

build() {
  cd "$pkgname-$pkgver"
  make
}

package() {
  cd "$pkgname-$pkgver"
  
  # binary
  install -vDm755 -t "$pkgdir/usr/bin" "$pkgname"

  # man page
  install -vDm644 -t "$pkgdir/usr/share/man/man1" "$pkgname.1"

  # license
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}

